package d0310;

public abstract class Lock {
    public abstract void open();{//抽象方法，只有方法签名，没有方法体
    }

    public void close() {
    }
}
class FingerprintLock extends Lock{
    @Override
    public void open() {
        System.out.println("指纹锁的open方法");
    }
}

class FaceLock extends Lock{
    @Override
    public void open() {
        System.out.println("人脸锁的open方法");
    }
}

class TestLock{
    public static void main(String[] args) {
       // Lock lock=new Lock() ;//抽象类不能实例化
    }
}